﻿<?xml version="1.0" encoding="UTF-8" ?>
<sqlMap namespace="ibatisnet" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 
  
  <statements>  
    <select id="SerialNoLogic_GetSerailNo"   parameterClass="Portal.Entity.SerialNoEntity" >
      SELECT SERIALNO
      FROM COM_SERIALNO
      WHERE SERIALTYPE=#SERIALTYPE# AND SERIALYEAR=#SERIALYEAR# AND SERIALMONTH=#SERIALMONTH# AND SERIALDAY=#SERIALDAY#
    </select>

    <insert id="SerialNoLogic_InsertSerailNo" parameterClass="Portal.Entity.SerialNoEntity" >
      INSERT INTO COM_SERIALNO
      (SERIALTYPE
      ,SERIALYEAR
      ,SERIALMONTH
      ,SERIALDAY
      ,SERIALNO
      ,UPDATEDATE)
      VALUES(
      #SERIALTYPE#
      ,#SERIALYEAR#
      ,#SERIALMONTH#
      ,#SERIALDAY#
      ,#SERIALNO#
      ,#UPDATEDATE#
      )
    </insert>

    <update id="SerialNoLogic_UpdateSerailNo"  parameterClass="Portal.Entity.SerialNoEntity" >
      UPDATE COM_SERIALNO
      SET SERIALNO=#SERIALNO#,UPDATEDATE=#UPDATEDATE#
      WHERE SERIALTYPE=#SERIALTYPE# AND SERIALYEAR=#SERIALYEAR# AND SERIALMONTH=#SERIALMONTH# AND SERIALDAY=#SERIALDAY#
    </update>
    
  </statements>
</sqlMap>